package com.example.demo.model.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.model.Stock;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface StockMapper extends BaseMapper<Stock> {

    @Update(value = "update stock set count = count - 1 ")
    int descCount();

    @Select(value = "select * from stock")
    List<Stock> selectAll();

}
